library(tidyverse)
library(DeclareDesign)
library(rdss)

sims <- 2000
bootstrap_sims <- 2000

source("code/declarations/declaration_10.1.R")

diagnosis_10.3 <-
  diagnose_design(
    declaration_10.1,
    diagnosands = declare_diagnosands(
      bias = mean(estimate - estimand),
      true_se = sd(estimate),
      power = mean(p.value <= 0.05),
      coverage = mean(estimand <= conf.high &
                        estimand >= conf.low)
    ),
    sims = sims,
    bootstrap_sims = bootstrap_sims
  )

write_rds(diagnosis_10.3, file = "diagnosis_objects/diagnosis_10.3.rds")
